using System;
using System.Collections.Generic;

namespace testDB
{
    public class User : IEquatable<User>
    {
        public IList<Role> Roles;
        public string Username { get; internal set;}
        public string Password { private get; set; }

        public bool Equals(User user)
        {
            if (user == null) return false;
            
            if (user.Username == this.Username)
                return true;
            else
                return false;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(this, obj)) return true;
            return Equals(obj as User);
        }

        public override int GetHashCode()
        {
            return 0;
        }
    }

    public class Role
    {
        public UserRepositoryTester.RoleType RoleType { get; set; }
    }
}